{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a6c8f24e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import akshare as ak"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "0aa51de8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "              日期    股票代码     开盘     收盘     最高     最低      成交量           成交额  \\\n",
      "0     2017-03-01  002475  21.88  21.90  22.12  21.78    72474  1.590721e+08   \n",
      "1     2017-03-02  002475  22.01  21.80  22.07  21.63    60962  1.332437e+08   \n",
      "2     2017-03-03  002475  21.85  22.20  22.34  21.75    91421  2.021587e+08   \n",
      "3     2017-03-06  002475  22.20  23.05  23.09  22.02   178500  4.080056e+08   \n",
      "4     2017-03-07  002475  23.08  22.90  23.18  22.75    77057  1.762604e+08   \n",
      "...          ...     ...    ...    ...    ...    ...      ...           ...   \n",
      "2072  2025-09-08  002475  49.09  49.75  51.92  48.78  2891255  1.455710e+10   \n",
      "2073  2025-09-09  002475  49.78  47.71  50.75  47.48  1881293  9.103503e+09   \n",
      "2074  2025-09-10  002475  46.28  48.09  48.97  45.82  2018773  9.549392e+09   \n",
      "2075  2025-09-11  002475  47.20  52.90  52.90  46.51  2842144  1.430645e+10   \n",
      "2076  2025-09-12  002475  54.20  52.71  55.66  52.46  4258492  2.309306e+10   \n",
      "\n",
      "         振幅    涨跌幅   涨跌额   换手率  \n",
      "0      1.55  -0.18 -0.04  0.39  \n",
      "1      2.01  -0.46 -0.10  0.33  \n",
      "2      2.71   1.83  0.40  0.49  \n",
      "3      4.82   3.83  0.85  0.95  \n",
      "4      1.87  -0.65 -0.15  0.41  \n",
      "...     ...    ...   ...   ...  \n",
      "2072   6.65   5.40  2.55  3.99  \n",
      "2073   6.57  -4.10 -2.04  2.60  \n",
      "2074   6.60   0.80  0.38  2.79  \n",
      "2075  13.29  10.00  4.81  3.93  \n",
      "2076   6.05  -0.36 -0.19  5.88  \n",
      "\n",
      "[2077 rows x 12 columns]\n"
     ]
    }
   ],
   "source": [
    "stock_zh_a_hist_df = ak.stock_zh_a_hist(symbol=\"002475\", period=\"daily\", start_date=\"20170301\", end_date='20250912', adjust=\"\")\n",
    "print(stock_zh_a_hist_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e3e76fdd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['日期', '股票代码', '开盘', '收盘', '最高', '最低', '成交量', '成交额', '振幅', '涨跌幅', '涨跌额',\n",
       "       '换手率'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_zh_a_hist_df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fed91516",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
